﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mjudoku
{
    public interface Model
    {
        /// <summary>
        /// Return array of actual numbers in boxes. Array is indexed from zero.
        /// </summary>
        /// <returns>two size numbers array</returns>
        int[,] getCisla();

        /// <summary>
        /// Return bool array in which true are all boxes which can be edited. Array is indexed from zero.
        /// </summary>
        /// <returns>two size bool array</returns>
        bool[,] getEditable();

        /// <summary>
        /// Loads sudoku from specified source (more details in implementation).
        /// </summary>
        /// <param name="source">source of sudoku</param>
        void loadSudoku(Object source);

        /// <summary>
        /// Return number on specified box.
        /// </summary>
        /// <param name="row">row of box</param>
        /// <param name="column">column of box</param>
        /// <returns>number</returns>
        int getNumber(int row, int column);

        /// <summary>
        /// Return true, if box on specified column and row is editable.
        /// </summary>
        /// <param name="row">row of box</param>
        /// <param name="column">column of box</param>
        /// <returns>bool</returns>
        bool isEditable(int row, int column);

        /// <summary>
        /// Return general size (widht or height) of whole game array.
        /// </summary>
        /// <returns>number</returns>
        int getSize();

        /// <summary>
        /// Return size (width or height) of one block in game array.
        /// </summary>
        /// <returns></returns>
        int getBlockSize();

        /// <summary>
        /// Init a new game array.
        /// </summary>
        /// <param name="blockSize">size of one block (typical 3)</param>
        /// <param name="arraySize">size of whole game (typical 9)</param>
        void initArray(int blockSize, int arraySize);

        /// <summary>
        /// Edit the number on specified position.
        /// </summary>
        /// <param name="row">row of editing number</param>
        /// <param name="column">column of editing number</param>
        /// <param name="newValue">value of editing number</param>
        void editNumber(int row, int column, int newValue);
    }
}
